-
Notifications
You must be signed in to change notification settings - Fork 23
FEAT: Add option for pep8 aliases in binding #1234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -86,4 +101,4 @@ def initialize(version: int) -> None: | |||
__register_function_codec() | |||
Logger.debug("Registered function codec") | |||
|
|||
_bind_assembly_for_explicit_interface("Ansys.ACT.WB1") | |||
_bind_assembly("Ansys.ACT.WB1", True, True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make it opt-in for now, like this:
app = App(pep8=True)
until it has gone through more usage/testing.
Codecov ReportAttention: Patch coverage is
❌ Your patch check has failed because the patch coverage (71.42%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1234 +/- ##
==========================================
- Coverage 86.40% 86.27% -0.13%
==========================================
Files 39 39
Lines 2537 2550 +13
==========================================
+ Hits 2192 2200 +8
- Misses 345 350 +5 🚀 New features to boost your workflow:
|
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the opt-out section looks wrong to me
@@ -231,7 +233,8 @@ def __init__(self, db_file=None, private_appdata=False, **kwargs): | |||
profile = UniqueUserProfile(new_profile_name, copy_profile=copy_profile) | |||
profile.update_environment(os.environ) | |||
|
|||
runtime.initialize(self._version) | |||
_pep8_alias = kwargs.get("pep8", False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ironically: leading underscore for a local variable isn't pep8 :)
@@ -86,4 +100,16 @@ def initialize(version: int) -> None: | |||
__register_function_codec() | |||
Logger.debug("Registered function codec") | |||
|
|||
_bind_assembly_for_explicit_interface("Ansys.ACT.WB1") | |||
explicit_interface = True # Currently no option to disable this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why no option to disable - if you're adding all these env vars?
This pull request refactors the
_bind_assembly_for_explicit_interface
function to make it more flexible and updates its usage in theinitialize
function. The refactored function now supports additional options for binding assemblies, including enabling PEP 8 aliases.Refactoring of
_bind_assembly_for_explicit_interface
:_bind_assembly_for_explicit_interface
to_bind_assembly
and added two optional parameters:explicit_interface
andpep8_aliases
. This allows the function to handle both explicit interface implementation and PEP 8 aliasing.AllowExplicitInterfaceImplementation
andPep8Aliases
based on the new parameters.Updates to
initialize
function:_bind_assembly_for_explicit_interface
with_bind_assembly
and passedTrue
for bothexplicit_interface
andpep8_aliases
arguments to enable these features for the "Ansys.ACT.WB1" assembly.Usage: